/*
 * Function check file size
 * */
function checkThumnailSizeOfFile(size) {
  var maxSize = 1024 * 1024 * 1;
  if (size < maxSize) {
     return 1;
  } else {
     return 0;
  }
}


/*
 * Function check extention of file
 * */
function checkThumnailExtenttsion(etx) {
  var validFileExtensions = ["jpg", "jpeg", "bmp", "gif",'png'];
  var blnValid = false;
  if (etx.length > 0) {
     for (var j = 0; j < validFileExtensions.length; j++) {
         var sCurExtension = validFileExtensions[j];
          if (etx.toLowerCase() == sCurExtension.toLowerCase()) {
             blnValid = true;
             break;
          }
      }
  }
  if (!blnValid) {
     return 0;
  } else {
    return 1;
  }
}
